package dbTools.tableInfo.field.fieldValidator.validators;

import java.util.ArrayList;

import dbTools.tableInfo.field.Field;
import dbTools.tableInfo.field.fieldValidator.FieldValidator;
import dbTools.tableInfo.field.fieldValidator.message.Message;
import dbTools.tableInfo.field.fieldValidator.param.FieldParm;

public class RequiredValidator extends FieldValidator {

	public RequiredValidator()
	{
		this.type=FieldValidator.REQUIRED;
	}
	
	@Override
	public void initParms(Field field) {
		this.parms=new ArrayList<FieldParm>();
		
		parms.add(new FieldParm("trim","true"));
		this.msg=new Message(field.getItemName()+"を${getText('errorinfo.required')}");
	}


}
